after set affinity, or else continue stub runs on current
cpu immediately before migrating is checked when switching
out.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
struct migrate_info *info;
cpumask_t mask = cpumask_of_cpu(cpu);
+ if ( cpu == smp_processor_id() )
+ return func(data);
+
info = xmalloc(struct migrate_info);
if ( info == NULL )
return -ENOMEM;
v->arch.continue_info = info;
vcpu_set_affinity(v, &mask);
- schedule_tail(v);
+ /* Dummy return value will be overwritten by new schedule_tail. */
+ BUG_ON(!test_bit(SCHEDULE_SOFTIRQ, &softirq_pending(smp_processor_id())));
return 0;
}